<template>
  <div class="parent">
      <fieldset>
        <legend>Parent</legend>
        <h1>父组件</h1>
        <Child :m="msg" @receive="handle" />
      </fieldset>
  </div>
</template>

<script>
  import Child from "./Child.vue"
  export default {
     components:{
      Child,
    },
    methods:{
      handle(input){
        console.log(input);
      }
    },
    data () {
      return {
        msg:"vue2"
      }
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<!-- 样式模块化 -->
<style scoped>

</style>
